﻿using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace Isha.Entities
{
    public class Comment
    {
        [Key]
        public int CommentID { get; set; }

        [ForeignKey("ContentItem")]
        public int ContentItemID { get; set; }

        [MaxLength(30)]
        public string Name { get; set; }

        [MaxLength(50)]
        public string ImageURL { get; set; }

        [MaxLength(30)]
        public string Email { get; set; }

        [MaxLength(30)]
        public string WebSite { get; set; }

        [MaxLength(200)]
        public string BodyText { get; set; }

        [ForeignKey("ParentItem")]
        public int? ParentItemID { get; set; }

        public virtual Comment ParentItem { get; set; }
        
        public virtual ContentItem ContentItem { get; set; }
    }
}